package com.jiazhong.spring.ioc.annotation;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
// 给对象进行初始化操作
@Component
public class DemoC {

    @Value("1")
    private Integer id;
    @Value("张三")
    private String name;

    @Override
    public String toString() {
        return "DemoC{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
